using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._DataExtraction
{
    /// <summary>
    /// <para>Send Email With Zip File Attachment</para>
    /// <para>Emails a file to an email address using an SMTP email server.</para>
    /// <para>使用 SMTP 电子邮件服务器将文件通过电子邮件发送到电子邮件地址。</para>
    /// </summary>    
    [DisplayName("Send Email With Zip File Attachment")]
    public class SendEmailWithZipFileAttachment : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SendEmailWithZipFileAttachment()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_To">
        /// <para>To</para>
        /// <para>The email address of the recipient.</para>
        /// <para>收件人的电子邮件地址。</para>
        /// </param>
        /// <param name="_From">
        /// <para>From</para>
        /// <para>The email address of the sender.</para>
        /// <para>发件人的电子邮件地址。</para>
        /// </param>
        /// <param name="_Subject">
        /// <para>Subject</para>
        /// <para>The text in the subject line of the email.</para>
        /// <para>电子邮件主题行中的文本。</para>
        /// </param>
        /// <param name="_Text">
        /// <para>Text</para>
        /// <para>The body text of the email.</para>
        /// <para>电子邮件的正文文本。</para>
        /// </param>
        /// <param name="_Zip_File">
        /// <para>Zip File</para>
        /// <para>The file to be attached to the email.</para>
        /// <para>要附加到电子邮件的文件。</para>
        /// </param>
        /// <param name="_Max_File_Size__MB_">
        /// <para>Max File Size (MB)</para>
        /// <para><xdoc>
        ///   <para>The maximum allowable size of an attachment.</para>
        ///   <para>If you don't know what to use for Max File Size, check the attachment size limit of your SMTP mail server and the recipient email provider.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>附件的最大允许大小。</para>
        ///   <para>如果您不知道“最大文件大小”使用什么，请检查 SMTP 邮件服务器和收件人电子邮件提供商的附件大小限制。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_SMTP_Email_Server">
        /// <para>SMTP Email Server</para>
        /// <para>The SMTP email server that will deliver the email.</para>
        /// <para>将传递电子邮件的 SMTP 电子邮件服务器。</para>
        /// </param>
        public SendEmailWithZipFileAttachment(object _To, object _From, object _Subject, object _Text, object _Zip_File, long? _Max_File_Size__MB_, object _SMTP_Email_Server)
        {
            this._To = _To;
            this._From = _From;
            this._Subject = _Subject;
            this._Text = _Text;
            this._Zip_File = _Zip_File;
            this._Max_File_Size__MB_ = _Max_File_Size__MB_;
            this._SMTP_Email_Server = _SMTP_Email_Server;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Send Email With Zip File Attachment";

        public override string CallName => "server.SendEmailWithZipFileAttachment";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_To, _From, _Subject, _Text, _Zip_File, _Max_File_Size__MB_, _SMTP_Email_Server, _User, _Password, _Sent];

        /// <summary>
        /// <para>To</para>
        /// <para>The email address of the recipient.</para>
        /// <para>收件人的电子邮件地址。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _To { get; set; }


        /// <summary>
        /// <para>From</para>
        /// <para>The email address of the sender.</para>
        /// <para>发件人的电子邮件地址。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _From { get; set; }


        /// <summary>
        /// <para>Subject</para>
        /// <para>The text in the subject line of the email.</para>
        /// <para>电子邮件主题行中的文本。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Subject")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Subject { get; set; }


        /// <summary>
        /// <para>Text</para>
        /// <para>The body text of the email.</para>
        /// <para>电子邮件的正文文本。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Text")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Text { get; set; }


        /// <summary>
        /// <para>Zip File</para>
        /// <para>The file to be attached to the email.</para>
        /// <para>要附加到电子邮件的文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Zip File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Zip_File { get; set; }


        /// <summary>
        /// <para>Max File Size (MB)</para>
        /// <para><xdoc>
        ///   <para>The maximum allowable size of an attachment.</para>
        ///   <para>If you don't know what to use for Max File Size, check the attachment size limit of your SMTP mail server and the recipient email provider.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>附件的最大允许大小。</para>
        ///   <para>如果您不知道“最大文件大小”使用什么，请检查 SMTP 邮件服务器和收件人电子邮件提供商的附件大小限制。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Max File Size (MB)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _Max_File_Size__MB_ { get; set; }


        /// <summary>
        /// <para>SMTP Email Server</para>
        /// <para>The SMTP email server that will deliver the email.</para>
        /// <para>将传递电子邮件的 SMTP 电子邮件服务器。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("SMTP Email Server")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _SMTP_Email_Server { get; set; }


        /// <summary>
        /// <para>User</para>
        /// <para>The user which will log in to the SMTP email server.</para>
        /// <para>将登录到 SMTP 电子邮件服务器的用户。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("User")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _User { get; set; } = null;


        /// <summary>
        /// <para>Password</para>
        /// <para>The user password used to connect to the SMTP email server (if necessary).</para>
        /// <para>用于连接到 SMTP 电子邮件服务器的用户密码（如有必要）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Password { get; set; } = null;


        /// <summary>
        /// <para>Send Email Succeeded</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Send Email Succeeded")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Sent { get; set; }


        public SendEmailWithZipFileAttachment SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}